import request from '@/utils/request'
// import { getToken } from '@/utils/storage'

// 模拟面试筛选条件
export const interviewAPI = () => {
  return request({
    url: '/interview/filters'
  })
}
// 获取模拟面试题
export const getInterviewAPI = params => {
  return request({
    url: '/interview/questions',
    params,
    flag: true
  })
}
export const interviewQuestions = params => {
  return request({
    url: '/interview/questions',
    params,
    flag: true
  })
}

export const info = () => {
  return request({
    url: '/au/info',
    flag: true
  })
}

export const interFilters = () => {
  return request({ url: '/interview/filters' })
}

export const questionFilters = id => {
  return request({
    url: `/questions/companyFilters/${id}`,
    flag: true
  })
}

export const companyQuestion = params => {
  const { id, position, difficulty } = params
  return request({
    url: `/questions/company/${id}`,
    params: {
      position,
      difficulty
    }
  })
}

export const submitQuestion = data => {
  return request({
    url: '/questions/submit',
    method: 'post',
    data,
    flag: true
  })
}

export const questionDetail = id => {
  return request({
    url: `/questions/${id}`,
    flag: true
  })
}

export const collectQuestion = data => {
  return request({
    url: '/questions/collect',
    method: 'post',
    data,
    flag: true
  })
}
